/////////////////////////////////////////////
//PDBookMarkTreeData
/////////////////////////////////////////////
function PDBookMarkTreeData ()
{
	this.m_nVersion = null;
	this.m_nBKCount = 0;
	this.m_arrBookMark = [];
	
	//var self = this;
	this.getBookMarkCount = function ()
	{
		return this.m_nBKCount;
	};
	
	this.getBookMarkDataByIndex = function (nIndex)
	{
		return this.m_arrBookMark[nIndex];
	};
	
	this.praseBookMarkTreeData = function (rd)
	{
		this.m_nBKCount = 0;
		this.m_nVersion = rd.readUint16();
		this.m_nBKCount = rd.readInt32();
		for (var i = 0; i < this.m_nBKCount; ++ i)
		{
			var pBookMarkData = new PDBookMarkData();
			pBookMarkData.praseBookMarkData(rd);
			this.m_arrBookMark[i] = pBookMarkData;
		}
	};
};

/////////////////////////////////////////////
//PDBookMarkData
/////////////////////////////////////////////
function PDBookMarkData ()
{
	this.m_nParentID = null;
	this.m_nID = null;
	this.m_strTitle = null;
	this.m_dwColorRef = null;
	this.m_dwFontStyle = null;
	this.m_arrDest = {};
	
	this.praseBookMarkData = function (rd)
	{
		this.m_nParentID = rd.readInt32();
		this.m_nID = rd.readInt32();
		var nTitleLen = rd.readUint8();
		if (nTitleLen > 0)
		{
			this.m_strTitle = rd.readString(nTitleLen);
		}
		this.m_dwColorRef = rd.readUint32();
		this.m_dwFontStyle = rd.readUint8();
		var nUseFlah = rd.readUint8();
		if (nUseFlah != 0)
		{
			this.m_arrDest.m_nPageIndex = rd.readInt32();
			this.m_arrDest.m_nZoomMode = rd.readInt32();
			this.m_arrDest.m_fLeft = rd.readFloat32();
			this.m_arrDest.m_fTop = rd.readFloat32();
			this.m_arrDest.m_fRight = rd.readFloat32();
			this.m_arrDest.m_fBottom = rd.readFloat32();
			this.m_arrDest.m_fScale = rd.readFloat32();
		}
		//console.log(this.m_nID + "," + this.m_nParentID + "," + this.m_strTitle);
		//console.log(this.m_arrDest.m_nPageIndex + "," + this.m_arrDest.m_nZoomMode + "," + this.m_arrDest.m_fLeft + "," + this.m_arrDest.m_fTop + "," + this.m_arrDest.m_fRight + "," + this.m_arrDest.m_fBottom + "," + this.m_arrDest.m_fScale)
	};
};



